package com.example.work;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Personalcenter extends AppCompatActivity {
     TextView tv_name;
    Button diary;
     @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_personalcenter);

        tv_name = findViewById(R.id.tv_name);
        diary= findViewById(R.id.btn_person);
        // 获取传递过来的用户名
        String username = getIntent().getStringExtra("username");
        // 在欢迎页面上显示“欢迎光临，用户名”
        tv_name.setText(username);
         diary.setOnClickListener(new View.OnClickListener()
         {
             @Override
             public void onClick(View v)
             {
                 Intent intent = new Intent(Personalcenter.this, Diary.class);
                 startActivity(intent);
             }
         });
    }
}
